<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <link rel="stylesheet" href="${staticServer}/inc/style/main.css"/>
    <link rel="stylesheet" href="${staticServer}/inc/style/page.css"/>
    <link rel="stylesheet" href="${staticServer}/css/work_today.css"/>
    <link rel="stylesheet" href="${staticServer}/css/consultant_client_tracking.css"/>
    <script src="${staticServer}/inc/js/jquery.js"></script>
    <script src="${staticServer}/inc/js/pageset.js"></script>
    <script src="${staticServer}/inc/js/submitter.js"></script>
    <script src="${staticServer}/inc/js/tips.js"></script>
    <script src="${staticServer}/js/web/consultant_client_tracking_list.js?1.0"></script>

    <link rel="stylesheet" href="${staticServer}/inc/style/date/datepicker.css"/>
    <script src="${staticServer}/inc/js/datepicker.js"></script>
    <script>
        var contextPath = '${contextPath}';

        $(function () {
            $("#good_type").val(${good_name_id});
        });

        function submit() {
            var center_name = $("#center option:selected").text();
            var goodsId = $("#good_type option:selected").val();
            window.location.href = "${contextPath}/goods/goodsList.htm?good_name_id=" + goodsId + "&center_name=" + center_name;

        }
        function storage(flag) {
            if (flag == 1) {
                if (${total2}=="0"
            )
                {
                    alert("暂时未有可以入库的物品!")
                    return false;
                }
            } else if (flag == 2) {
                if (${total3}=="0"
            )
                {
                    alert("暂时未有可以出库的物品!")
                    return false;
                }
            }
            if (flag == 3) {
                window.location.href = "${contextPath}/goods/centralDistribution.htm";
            } else {
                window.location.href = "${contextPath}/goods/goodsStorage.htm?flag=" + flag;
            }
        }

        function getKeyDetail(id) {
            window.location.href = "${contextPath}/goods/getKeyDetail.htm?id=" + id;
        }

    </script>
</head>

<body>
<input type="hidden" id="traId" value="">
<div id="home_link">
    <ul>
        <li></li>
        <li>&gt;</li>
        <li>采购管理</li>
        <li>&gt;</li>
        <li class="current">库存信息</li>
    </ul>
</div>
<div id="container">
    <div id="title">库存信息</div>
    <table class="simple_table" rel="nohover" style="min-width: 750px;">
        <tr>
            <td>
                <label for="phone">中心地址：</label>
                <select id="center">
                    <option value="">全部</option>
                <#if offList??>
                    <#list offList as list>
                        <option value="${list.name}">${list.name}</option>
                    </#list>
                </#if>
                    <select>
                    <#--<label for="phone">物品分类：</label>
                    <select id="type">
                        <option value="">全部</option>
                        <option value="1">固定资产</option>
                        <option value="2">消耗品</option>
                    <select>-->
                        <label for="phone">类型：</label>
                        <select id="good_type">
                            <option value="1">电脑</option>
                            <option value="2">404电话</option>
                            <option value="3">宽带</option>
                            <option value="4">办公家具</option>
                            <option value="5">流量卡</option>
                            <option value="6">办公相关</option>
                            <option value="7">伯温文具+玩具</option>
                            <option value="8">学院路寄送物品</option>
                            <option value="9">训练用品</option>
                            <option value="10">书籍</option>
                            <option value="11">灯具</option>
                            <option value="12">消耗品</option>
                            <option value="13">钥匙</option>
                            <option value="14">手机资费情况</option>
                            <option value="15">显示器</option>
                            <select>

            <td>
                <input type="button" value=" 查 询 " onclick="submit()"/>
                <input type="button" value=" 入 库 " onclick="storage(1)"/><label
                    style="color: red">可入库物品:(${total2})</label>
                <input type="button" value=" 出 库 " onclick="storage(2)"/><label
                    style="color: red">需出库物品:(${total3})</label>
                <input type="button" value=" 中心分配" onclick="storage(3)"/>
            </td>
        </tr>
    </table>


    <table>

    <#if good_name_id=="1">
        <tr class="fields">
            <th width="100">中心</th>
            <th width="100">物品型号</th>
            <th width="100">编号/编码</th>
            <th width="100">用途</th>
            <th width="100">状态</th>
            <th width="100">备注</th>
            <th width="100">操作</th>
        </tr>
        <#if list??>
            <#list list as list>
                <tr class="even_row">
                    <td align="center">${list.center_name}</td>
                    <td align="center">${list.model}</td>
                    <td align="center">${list.code}</td>
                    <td align="center">${list.purpose}</td>
                    <td align="center">${list.state}</td>
                    <td align="center">${list.msg}</td>
                    <td align="center"><a href="">编辑</a></td>
                </tr>
            </#list>
        </#if>
    <#elseif good_name_id=="2">
        <tr class="fields">
            <th width="100">400号码</th>
            <th width="100">使用期限</th>
            <th width="100">资费</th>
            <th width="100">剩余时长</th>
            <th width="100">使用地方</th>
            <th width="100">操作</th>
        </tr>
        <#if list??>
            <#list list as list>
                <tr class="even_row">
                    <td align="center">${list.item_name}</td>
                    <td align="center">${list.use_period}</td>
                    <td align="center">${list.postage}</td>
                    <td align="center">${list.residual_length}</td>
                    <td align="center">${list.msg}</td>
                    <td align="center"><a href="">编辑</a></td>
                </tr>
            </#list>
        </#if>
    <#elseif good_name_id=="3">
        <tr class="fields">
            <th width="100">中心名称</th>
            <th width="100">地址</th>
            <th width="100">续费时长</th>
            <th width="100">供应商（ISP）</th>
            <th width="100">费用</th>
            <th width="100">带宽</th>
            <th width="100">宽带类型</th>
            <th width="100">操作</th>
        </tr>
        <#if list??>
            <#list list as list>
                <tr class="even_row">
                    <td align="center">${list.center_name}</td>
                    <td align="center">${list.msg}</td>
                    <td align="center">${list.renew_time}</td>
                    <td align="center">${list.postage}</td>
                    <td align="center">${list.supplier}</td>
                    <td align="center">${list.broadband_type}</td>
                    <td align="center">${list.broadband_type2}</td>
                    <td align="center"><a href="">编辑</a></td>
                </tr>
            </#list>
        </#if>
    <#elseif good_name_id=="4">
        <tr class="fields">
            <th width="100">物品清单</th>
            <th width="100">数量</th>
            <th width="100">单价</th>
            <th width="100">采购链接</th>
            <th width="100">备注</th>
            <th width="100">操作</th>
        </tr>
        <#if list??>
            <#list list as list>
                <tr class="even_row">
                    <td align="center">${list.item_name}</td>
                    <td align="center">${list.number}</td>
                    <td align="center">${list.unit_price}</td>
                    <td align="center">${list.purchasing_link}</td>
                    <td align="center">${list.msg}</td>
                    <td align="center"><a href="">编辑</a></td>
                </tr>
            </#list>
        </#if>

    <#elseif good_name_id=="5">
        <tr class="fields">
            <th width="100">物品清单</th>
            <th width="100">类型</th>
            <th width="100">套餐</th>
            <th width="100">采购链接</th>
            <th width="100">操作</th>
        </tr>
        <#if list??>
            <#list list as list>
                <tr class="even_row">
                    <td align="center">${list.item_name}</td>
                    <td align="center">${list.model}</td>
                    <td align="center">${list.code}</td>
                    <td align="center">${list.purchasing_link}</td>
                    <td align="center"><a href="">编辑</a></td>
                </tr>
            </#list>
        </#if>

    <#elseif good_name_id=="6">
        <tr class="fields">
            <th width="100">物品清单</th>
            <th width="100">数量</th>
            <th width="100">单价</th>
            <th width="100">型号描述</th>
            <th width="100">操作</th>
        </tr>
        <#if list??>
            <#list list as list>
                <tr class="even_row">
                    <td align="center">${list.item_name}</td>
                    <td align="center">${list.number}</td>
                    <td align="center">${list.unit_price}</td>
                    <td align="center">${list.msg}</td>
                    <td align="center"><a href="">编辑</a></td>
                </tr>
            </#list>
        </#if>
    <#elseif good_name_id=="7">
        <tr class="fields">
            <th width="100">物品清单</th>
            <th width="100">数量</th>
            <th width="100">单价</th>
            <th width="100">颜色分类</th>
            <th width="100">操作</th>
        </tr>
        <#if list??>
            <#list list as list>
                <tr class="even_row">
                    <td align="center">${list.item_name}</td>
                    <td align="center">${list.number}</td>
                    <td align="center">${list.unit_price}</td>
                    <td align="center">${list.msg}</td>
                    <td align="center"><a href="">编辑</a></td>
                </tr>
            </#list>
        </#if>


    <#elseif good_name_id=="8">
        <tr class="fields">
            <th width="100">申请物品</th>
            <th width="100">数量</th>
            <th width="100">单位</th>
            <th width="100">寄出中心</th>
            <th width="100">备注</th>
            <th width="100">操作</th>
        </tr>
        <#if list??>
            <#list list as list>
                <tr class="even_row">
                    <td align="center">${list.item_name}</td>
                    <td align="center">${list.number}</td>
                    <td align="center">${list.company}</td>
                    <td align="center">${list.center_name}</td>
                    <td align="center">${list.msg}</td>
                    <td align="center"><a href="">编辑</a></td>
                </tr>
            </#list>
        </#if>

    <#elseif good_name_id=="9">
        <tr class="fields">
            <th width="100">申请物品</th>
            <th width="100">申请数量</th>
            <th width="100">单价</th>
            <th width="100">采购链接</th>
            <th width="100">操作</th>
        </tr>
        <#if list??>
            <#list list as list>
                <tr class="even_row">
                    <td align="center">${list.item_name}</td>
                    <td align="center">${list.number}</td>
                    <td align="center">${list.unit_price}</td>
                    <td align="center">${list.purchasing_link}</td>
                    <td align="center"><a href="">编辑</a></td>
                </tr>
            </#list>
        </#if>


    <#elseif good_name_id=="10">
        <tr class="fields">
            <th width="100">申请物品</th>
            <th width="100">申请数量</th>
            <th width="100">采购链接</th>
            <th width="100">操作</th>
        </tr>
        <#if list??>
            <#list list as list>
                <tr class="even_row">
                    <td align="center">${list.item_name}</td>
                    <td align="center">${list.number}</td>
                    <td align="center">${list.purchasing_link}</td>
                    <td align="center"><a href="">编辑</a></td>
                </tr>
            </#list>
        </#if>

    <#elseif good_name_id=="11">
        <tr class="fields">
            <th width="100">申请物品</th>
            <th width="100">申请数量</th>
            <th width="100">注意事项</th>
            <th width="100">采购链接</th>
            <th width="100">操作</th>
        </tr>
        <#if list??>
            <#list list as list>
                <tr class="even_row">
                    <td align="center">${list.item_name}</td>
                    <td align="center">${list.number}</td>
                    <td align="center">${list.msg}</td>
                    <td align="center">${list.purchasing_link}</td>
                    <td align="center"><a href="">编辑</a></td>
                </tr>
            </#list>
        </#if>
    <#elseif good_name_id=="12">
        <tr class="fields">
            <th width="100">物品清单</th>
            <th width="100">申请数量</th>
            <th width="100">操作</th>
        </tr>
        <#if list??>
            <#list list as list>
                <tr class="even_row">
                    <td align="center">${list.item_name}</td>
                    <td align="center">${list.number}</td>
                    <td align="center"><a href="">编辑</a></td>
                </tr>
            </#list>
        </#if>
    <#elseif good_name_id=="14">
        <tr class="fields">
            <th width="100">地区</th>
            <th width="100">运营商</th>
            <th width="100">形式</th>
            <th width="100">电话</th>
            <th width="100">电话负责老师</th>
            <th width="100">操作</th>
        </tr>
        <#if list??>
            <#list list as list>
                <tr class="even_row">
                    <td align="center">${list.center_name}</td>
                    <td align="center">${list.model}</td>
                    <td align="center">${list.code}</td>
                    <td align="center">${list.phone}</td>
                    <td align="center">${list.responsible_tea}</td>
                    <td align="center"><a href="">编辑</a></td>
                </tr>
            </#list>
        </#if>
    <#elseif good_name_id=="15">
        <tr class="fields">
            <th width="100">中心名称</th>
            <th width="100">显示器数量</th>
            <th width="100">状态</th>
            <th width="100">操作</th>
        </tr>
        <#if list??>
            <#list list as list>
                <tr class="even_row">
                    <td align="center">${list.center_name}</td>
                    <td align="center">${list.number}</td>
                    <td align="center">${list.state}</td>
                    <td align="center"><a href="">编辑</a></td>
                </tr>
            </#list>
        </#if>

    <#elseif good_name_id=="13">
        <#if center_name=="杭州教工路总部">
            <tr class="fields">
                <th width="100">中心</th>
                <th width="100">会议室钥匙</th>
                <th width="100">地下锁</th>
                <th width="100">仓库</th>
                <th width="100">忽老师办公室</th>
                <th width="100">更衣室</th>
                <th width="100">安全道钥匙</th>
                <th width="100">项目部</th>
                <th width="100">财务室侧门</th>
                <th width="100">在线部门</th>
                <th width="100">成长室</th>

                <th width="100">操作</th>
            </tr>
        <#else >
            <tr class="fields">
                <th width="100">中心</th>
                <th width="100">会议室钥匙</th>
                <th width="100">保管情况</th>
                <th width="100">咨询室钥匙</th>
                <th width="100">保管情况</th>
                <th width="100">训练室钥匙</th>
                <th width="100">保管情况</th>
                <th width="100">大门钥匙</th>
                <th width="100">保管情况</th>
                <th width="100">办公室钥匙</th>
                <th width="100">保管情况</th>

                <th width="100">操作</th>
            </tr>
        </#if>
        <#if list??>
            <#list list as list>
                <tr class="even_row">
                    <td align="center">${list.center_name}</td>
                    <td align="center">${list.conference_room}</td>
                    <td align="center">${list.conference_number}</td>
                    <td align="center">${list.consulting_room}</td>
                    <td align="center">${list.consulting_number}</td>
                    <td align="center">${list.training_room}</td>
                    <td align="center">${list.training_number}</td>
                    <td align="center">${list.gate_room}</td>
                    <td align="center">${list.gate_number}</td>
                    <td align="center">${list.office_room}</td>
                    <td align="center">${list.office_number}</td>


                    <td align="center"><a href="">编辑</a>-<a href="javascript:volid(0);"
                                                            onclick="getKeyDetail('${list.id}')">详情</a>

                    </td>
                </tr>
            </#list>
        </#if>

    </#if>

    </table>
</div>

<div id="pager">
    <ul id="pagination" style="padding-left: 14px">
    <#if page??>
        <#if page.pagetotal?? && page.pagetotal!="0">
            <#assign pagetotal = page.pagetotal>
        <#else>
            <#assign pagetotal = 1>
        </#if>
        <#if page.currpage??>
            <#assign currpage = page.currpage>
        <#else>
            <#assign currpage = 1>
        </#if>
        <#if currpage==1 >
            <li class="previous-off">首页</li>
            <li class="previous-off">上一页</li>
        <#else>
            <li class="previous"><a href="${contextPath}/goods/goodsList.htm?center_name=${center_name}&good_name_id=${good_name_id}&currPage=1">首页</a>
            </li>
            <li class="previous"><a
                    href="${contextPath}/goods/goodsList.htm?center_name=${center_name}&good_name_id=${good_name_id}&currPage=${currpage-1}">上一页</a>
            </li>
        </#if>
        <input type="hidden" id="total" value="${page.pagetotal}"/>
        <#if pagetotal<=11>
            <#list 1..pagetotal as index_up>
                <#if currpage==index_up >
                    <li class="current">${index_up}</li>
                <#else>
                    <li>
                        <a href="${contextPath}/goods/goodsList.htm?center_name=${center_name}&good_name_id=${good_name_id}&currPage=${index_up}">${index_up}</a>
                    </li>
                </#if>
            </#list>
        <#else>
            <#if currpage<=8 >
                <#list 1..9 as index_up>
                    <#if currpage==index_up >
                        <li class="current">${index_up}</li>
                    <#else>
                        <li>
                            <a href="${contextPath}/goods/goodsList.htm?center_name=${center_name}&good_name_id=${good_name_id}&currPage=${index_up}">${index_up}</a>
                        </li>
                    </#if>
                </#list>
                <li>...</li>
                <li>
                    <a href="${contextPath}/goods/goodsList.htm?center_name=${center_name}&good_name_id=${good_name_id}&currPage=${pagetotal}">${pagetotal}</a>
                </li>

            <#elseif (currpage>= 9 && currpage<pagetotal-7)  >
                <li><a href="${contextPath}/goods/goodsList.htm?center_name=${center_name}&good_name_id=${good_name_id}&currPage=1">1</a></li>
                <li>...</li>
                <#list currpage-3..currpage+3 as index_up>
                    <#if currpage==index_up >
                        <li class="current">${index_up}</li>
                    <#else>
                        <li>
                            <a href="${contextPath}/goods/goodsList.htm?center_name=${center_name}&good_name_id=${good_name_id}&currPage=${index_up}">${index_up}</a>
                        </li>
                    </#if>
                </#list>
                <li>...</li>
                <li>
                    <a href="${contextPath}/goods/goodsList.htm?center_name=${center_name}&good_name_id=${good_name_id}&currPage=${pagetotal}">${pagetotal}</a>
                </li>
            <#else>
                <li><a href="${contextPath}/goods/goodsList.htm?center_name=${center_name}&currPage=1&good_name_id=${good_name_id}">1</a></li>
                <li>...</li>
                <#list pagetotal-8..pagetotal as index_up>
                    <#if currpage==index_up >
                        <li class="current">${index_up}</li>
                    <#else>
                        <li>
                            <a href="${contextPath}/goods/goodsList.htm?center_name=${center_name}&good_name_id=${good_name_id}&currPage=${index_up}">${index_up}</a>
                        </li>
                    </#if>
                </#list>
            </#if>
        </#if>
        <#if currpage==pagetotal >
            <li class="previous-off">下一页</li>
            <li class="previous-off">尾页</li>
        <#else>
            <li class="previous"><a
                    href="${contextPath}/goods/goodsList.htm?center_name=${center_name}&good_name_id=${good_name_id}&currPage=${currpage+1}">下一页</a>
            </li>
            <li class="previous"><a
                    href="${contextPath}/goods/goodsList.htm?center_name=${center_name}&good_name_id=${good_name_id}&currPage=${page.pagetotal}">尾页</a>
            </li>
        </#if>
        <li class="previous"></li>
        <li class="pageinfo">共${page.total}条记录</li>
    </#if>
    </ul>
</div>

<div class="emptyline"></div>
</body>
</html>